#pragma once

#include "AllocationPolicy.h"

#define MM_NEW(T) new (MemMgr::Allocate(sizeof(T), __FILE__, __FUNCTION__, __LINE__)) T
#define MM_DELETE(PTR) MemMgr::Delete(PTR)

#define MM_NEW_A(T, NUM) (MemMgr::AllocateA<T>(sizeof(T), NUM, __FILE__, __FUNCTION__, __LINE__))
#define MM_DELETE_A(PTR) MemMgr::DeleteA(PTR)

#define MM_MALLOC(NUM) MemMgr::Allocate(NUM, __FILE__, __FUNCTION__, __LINE__)
#define MM_FREE(PTR) MemMgr::Deallocate(PTR)

#define SMALL_OBJ_MAX_SIZE 32	// must be >= 32
#define PAGE_SIZE 65536			// must be >= SMALL_OBJ_MAX_SIZE
#define MEMORY_QUOTA 1<<28